<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('查看题目分类')" />
</head>
<body class="gray-bg">
	
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>查看题目分类</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m" id="form-category-view" th:object="${questionCategory}">
							<input name="id" th:field="*{id}" type="hidden">
							<div class="form-group">
								<label class="col-sm-3 control-label">分类名称：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{categoryName}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">父分类：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:with="parentCategory=${not #lists.isEmpty(categories) ? categories.?[id == questionCategory.parentId] : null}">
    <span th:if="${parentCategory != null and not #lists.isEmpty(parentCategory)}" th:text="${parentCategory[0].categoryName}"></span>
    <span th:if="${parentCategory == null or #lists.isEmpty(parentCategory) or questionCategory.parentId == 0}">无父分类</span>
</p>

								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">排序号：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{sort}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">创建人：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{createBy}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">创建时间：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{createTime}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">更新人：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{updateBy}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">更新时间：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{updateTime}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">删除标志：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{delFlag} == '0' ? '正常' : '删除'"></p>
								</div>
							</div>
							<div class="form-group">
								<div class="form-control-static col-sm-offset-9">
									<button type="button" class="btn btn-danger" onclick="closeItem()">关闭</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<th:block th:include="include :: footer" />
	
	<script type="text/javascript">
		function closeItem() {
			var index = parent.layer.getFrameIndex(window.name);
			parent.layer.close(index);
		}
	</script>
</body>
</html>